/*
 * Copyright (c) 2013-2015 Charkey. All rights reserved.
 *
 * This software is the confidential and proprietary information of Charkey.
 * You shall not disclose such Confidential Information and shall use it only
 * in accordance with the terms of the agreements you entered into with Charkey.
 *
 * Charkey MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF THE SOFTWARE,
 * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
 * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT.
 *
 * Charkey SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING,
 * MODIFYING OR DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES.
 */

package cn.simastudio.talos.core.service.base;

/**
 * Usage: Common模块调用Inter模块的接口<br/>
 * 需要在Inter模块中实现接口
 *
 * @author Charkey
 * @date 2015/6/7 11:10
 */
public interface CoreToInterService {

    /**
     * 通过会员手机号查询会员Id
     *
     * @param tel 会员手机号
     * @return 会员ID
     */
    Integer getMemberIdByTel(String tel);

    /**
     * 校验请求头 Header 传过来的 Credential(memberId memberTel) 是否匹配
     *
     * @param credential 请求头传过来的Credential信息，包括memberId和memberTel，空格分隔
     * @return 校验结果：true：匹配；false：不匹配
     */
    boolean validCredential(String credential);
}